A hint to create and use an index on the specified data column. The hint has default action.
Namespace:
C1.LiveLinq.AdoNetAssembly: C1.LiveLinq (in C1.LiveLinq.dll)
Syntax
C# |
---|
public static T IndexedField<T>( this DataRow row, string columnName ) |
Visual Basic |
---|
<ExtensionAttribute> _ Public Shared Function IndexedField(Of T) ( _ row As DataRow, _ columnName As String _ ) As T |
Parameters
- row
- Type: System.Data..::..DataRow
The data row.
- columnName
- Type: System..::..String
The name of the column.
Type Parameters
- T
- The type of the data column
Return Value
The data column value.Remarks
Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on that column, if possible.
When the query is executed, the hint method IndexedField is replaced with the standard LINQ to DataSet extension method
Field. See Hints for more details.
Examples
Copy CodeC#
var query = from c in customersTable where c.IndexedField<string>("CustomerID") == "ALFKI" select c; |